﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExecSql
{
    public static class StringExt
    {
        /// <summary>
        /// 扩展string直接输出到控制台
        /// </summary>
        /// <param name="str"></param>
        /// <param name="color"></param>
        public static void ConsoleWriteLinColer(this string str,ConsoleColor color)
        {
            ConsoleColor currentForeColor = Console.ForegroundColor;
            Console.ForegroundColor = color;
            str.ConsoleWriteLin();
            Console.ForegroundColor = currentForeColor;
        }

        public static void ConsoleWriteLin(this string str)
        {
            Console.WriteLine(str);
        }
    }
}
